using TypeSpec.OpenAPI;

namespace OpenAI;

union RealtimeClientEventType {
  string,
  session_update: "session.update",
  input_audio_buffer_append: "input_audio_buffer.append",
  input_audio_buffer_commit: "input_audio_buffer.commit",
  input_audio_buffer_clear: "input_audio_buffer.clear",
  output_audio_buffer_clear: "output_audio_buffer.clear",
  conversation_item_create: "conversation.item.create",
  conversation_item_retrieve: "conversation.item.retrieve",
  conversation_item_truncate: "conversation.item.truncate",
  conversation_item_delete: "conversation.item.delete",
  response_create: "response.create",
  response_cancel: "response.cancel",
  transcription_session_update: "transcription_session.update",
}

union RealtimeServerEventType {
  string,
  error: "error",
  session_created: "session.created",
  session_updated: "session.updated",
  conversation_created: "conversation.created",
  conversation_item_input_audio_transcription_completed: "conversation.item.input_audio_transcription.completed",
  conversation_item_input_audio_transcription_delta: "conversation.item.input_audio_transcription.delta",
  conversation_item_input_audio_transcription_failed: "conversation.item.input_audio_transcription.failed",
  conversation_item_created: "conversation.item.created",
  conversation_item_retrieved: "conversation.item.retrieved",
  conversation_item_truncated: "conversation.item.truncated",
  conversation_item_deleted: "conversation.item.deleted",
  input_audio_buffer_committed: "input_audio_buffer.committed",
  input_audio_buffer_cleared: "input_audio_buffer.cleared",
  input_audio_buffer_speech_started: "input_audio_buffer.speech_started",
  input_audio_buffer_speech_stopped: "input_audio_buffer.speech_stopped",
  output_audio_buffer_cleared: "output_audio_buffer.cleared",
  output_audio_buffer_started: "output_audio_buffer.started",
  output_audio_buffer_stopped: "output_audio_buffer.stopped",
  response_created: "response.created",
  response_done: "response.done",
  response_output_item_added: "response.output_item.added",
  response_output_item_done: "response.output_item.done",
  response_content_part_added: "response.content_part.added",
  response_content_part_done: "response.content_part.done",
  response_text_delta: "response.text.delta",
  response_text_done: "response.text.done",
  response_audio_transcript_delta: "response.audio_transcript.delta",
  response_audio_transcript_done: "response.audio_transcript.done",
  response_audio_delta: "response.audio.delta",
  response_audio_done: "response.audio.done",
  response_function_call_arguments_delta: "response.function_call_arguments.delta",
  response_function_call_arguments_done: "response.function_call_arguments.done",
  transcription_session_updated: "transcription_session.updated",
  rate_limits_updated: "rate_limits.updated",
}
